package com.ch06.config;

import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;

/**
 * @ClassName WebConfig
 * @Description Web配置类
 * @Author Kx
 * @Date 2025/5/13 11:09
 * @Version 1.0
 */
public class WebConfig extends AbstractAnnotationConfigDispatcherServletInitializer {
    /**
     * @author: kx
     * @date: 2025/5/13 11:10
     * @return java.lang.Class<?>[]
     * @description: 配置主配置类
    */
    @Override
    protected Class<?>[] getRootConfigClasses() {
        return new Class[0];
    }

    /**
     * @author: kx
     * @date: 2025/5/13 11:10
     * @return java.lang.Class<?>[]
     * @description: 配置MVC配置类
    */
    @Override
    protected Class<?>[] getServletConfigClasses() {
        return new Class[]{MvcConfig.class};
    }

    /**
     * @author: kx
     * @date: 2025/5/13 11:10
     * @return java.lang.String[]
     * @description: 配置映射路径
    */
    @Override
    protected String[] getServletMappings() {
        return new String[]{"/"};
    }
}
